<!--
 * @Author: 乔
 * @Date: 2021-10-09 13:41:03
 * @LastEditTime: 2021-11-08 09:38:24
 * @LastEditors: 乔
 * @FilePath: \tp30\app\admin\view\user\user.html
-->
{include file='public/head' t='网站信息'}

<body>
	<div class="panel admin-panel">
		<div class="panel-head"><strong class="icon-reorder"> 用户列表</strong>
			<a href="" style="float:right; display:none;">添加字段</a>
		</div>
		<form method="post" action="" id="listform">
			<table class="table table-hover text-center">
				<tr>
					<th width="100" style="text-align:left; padding-left:20px;">ID</th>
					<th width="15%">用户名</th>
					<th width="20%">头像</th>
					<th width="20%">权限</th>
					<th width="310">操作</th>
				</tr>
				{volist name='list' id='v'}
				<tr>
					<td style="text-align:left; padding-left:20px;"><input type="checkbox" name="id[]"
							value="{$v.id}" /> {$v.id}
					</td>
					<td>{$v.name}</td>
					<td width="10%"><img src="__ADMIN__/{$v.headimg}" alt="" width="70" height="50" /></td>
					<td>{$v.title|default="暂未设置权限"}</td>

					<td>
						<div class="button-group">
							<a class="button border-main" href="{:url('User/userEdit')}"><span class="icon-edit"></span>
								修改</a>
							<a class="button border-red" href="javascript:del()"><span class="icon-trash-o"></span>
								删除</a>
						</div>
					</td>
				</tr>
				{/volist}
				<tr>
					<td style="text-align:left; padding:19px 0;padding-left:20px;"><input type="checkbox"
							id="checkall" /> 全选 </td>
					<td colspan="7" style="text-align:left;padding-left:20px;">
						<a href="javascript:DelSelect()" class="button border-red icon-trash-o"
							style="padding:5px 15px;"> 全删</a>
					</td>
				</tr>
				<tr>
					<td colspan="8">
						<div class="pagelist">
							<!-- <a href="">上一页</a> <span class="current">1</span>
							<a href="">2</a>
							<a href="">3</a>
							<a href="">下一页</a>
							<a href="">尾页</a> -->
							{$list|raw}
						</div>
					</td>
				</tr>
			</table>
		</form>
	</div>
	<script>
		//全选
		$("#checkall").click(function () {
			$("input[name='id[]']").each(function () {
				if (this.checked) {
					this.checked = false;
				}
				else {
					this.checked = true;
				}
			});
		})
		// 删除
		function del() {
			if (confirm("确认删除吗?")) {

			}
		}
	</script>
</body>

</html>